<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>一物一码规则</title>
<load href="__PUBLIC__/css/bootstrap.min.css" />
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<style type="text/css">
.main-frame{border: none;}
ul.ul{display:block; clear:both; border:solid 1px #eee; border-radius:5px; width: 100%; height: 600px; list-style:none; margin:0px; padding:0px; overflow:auto; overflow-x:hidden;}
ul.ul span{display: block; padding: 10px; overflow: hidden;}
ul.ul li{clear:none; float:none; padding:0px; margin:0px; display:block; float:left; width:150px; overflow:hidden; height:24px; line-height:24px; margin-right:6px;}
div.pushhead{border-bottom:solid 1px #eee; clear:both; margin-bottom:0px; height: 36px; line-height: 36px; background-color: #383e4c; padding: 0px 12px; color: #fff;}
input.tjiao{display: block; clear: both; width: 150px; margin: 0px auto; margin-top: 12px; background-color: #ff5454; list-style: none; color: #fff; font-size: 14px; border: none; height: 32px; line-height: 28px; border-radius: 3px;}
</style>
</head>

<body id="body">
<div class="main-frame">
	<div class="position">华人码 > 账号管理 > 一物一码指定规则</div>
	<div class="addobject">
		<!--勾选-->
		<form name="form2" id="form2" class="form2" action="{:U('rule')}" method="post">
			<ul class="ul">
				<div class="pushhead"><input type="checkbox" value="1" name="select_all" class="extendedattr" v="0"> 全选</div>
				<span class="span">
				<volist name='typelist' id='v'>
					<li><input type="checkbox" value="{$v.id}" name="ad_push_ma[]" class="extendedattr"<if condition="$v['isvote'] eq 1"> checked</if>> {$v.typename}</li>
				</volist>
				</span>
			</ul>
			<input class="tjiao" type="submit" value="提 交" name="tjiao" />
		</form>
	</div>

</div>

<script type="text/javascript">
	$(function () {
		$("input[name='select_all']").click(function(){
			if($(this).attr("v")==0){
				$(this).attr("v",1);
				$("span.span li").each(function(index, element) {
					$(this).find("input").prop("checked","checked");
				});
			}else{
				$(this).attr("v",0);
				$(this).removeAttr("checked");
				$("span.span li").each(function(index, element) {
					$(this).find("input").removeAttr("checked");
				});
			}
		})
	});
</script>
</body>
</html>
